console.log('15PointSimplifier4');
let utils = data["utils"];
let RBushItem = data["RBushItem"];
let RBU = data["RBU"];
let RBush = data["RBush"];
let AreaForRender = data["AreaForRender"];
let quickselect = data["quickselect"];
let SphericalMercator = data["SphericalMercator"];
let PointItem = data["PointItem"];
let PointForRender = data["PointForRender"];
let BoundsItem = data["BoundsItem"];
let QuadTree = data["QuadTree"];
let Node = data["Node"];
let PointSimplifier = data["PointSimplifier"];
let BaseRender = data["BaseRender"];
let LeftNumFunnel = data["LeftNumFunnel"];


utils.extend(PointSimplifier.prototype, { getClusterPointsByCenter: function (currentCenterLng, currentCenterLat, zoom, width, height, interval, minCluster) { var extentPoints = this.getPointsByCenter(currentCenterLng, currentCenterLat, zoom, width, height), clusterPoints; return this.getClusterPoints(currentCenterLng, currentCenterLat, zoom, width, height, extentPoints, interval, minCluster) }, findGridinfo: function (canvas_width, canvas_height, extent, interval, point) { var clientw = canvas_width, clientH = canvas_height, lngRange = extent[2] - extent[0], latRange = extent[3] - extent[1], xNum = Math.floor(clientw / interval) + 1, yNum, gridLng = lngRange / xNum, gridLat = latRange / (Math.floor(clientH / interval) + 1), x = Math.floor((point.lng - extent[0]) / gridLng), y = Math.floor((point.lat - extent[1]) / gridLat), idx = (y - 1) * xNum + x, minX, minY, maxX, maxY, pGridInfo; return { minX: extent[0] + gridLng * x, minY: extent[1] + gridLat * y, maxX: extent[0] + gridLng * (x + 1), maxY: extent[1] + gridLat * (y + 1), idx: idx, items: [] } }, getClusterPoints: function (currentCenterLng, currentCenterLat, zoom, canvas_width, canvas_height, extentPoints, interval, minCluster) { for (var extent = this.getExtent(currentCenterLng, currentCenterLat, zoom, canvas_width, canvas_height), clusterPoints = [], mapDataGrid = {}, i = 0; i < extentPoints.length; i++) { var curPoint = extentPoints[i], gridinfo = this.findGridinfo(canvas_width, canvas_height, extent, interval, curPoint); mapDataGrid.hasOwnProperty(gridinfo.idx) ? gridinfo = mapDataGrid[gridinfo.idx] : mapDataGrid[gridinfo.idx] = gridinfo, gridinfo.items.push(curPoint) } for (var key in mapDataGrid) { var pGridInfo = mapDataGrid[key]; if (pGridInfo.items.length < minCluster) for (let index = 0; index < pGridInfo.items.length; index++) { const curPoint = pGridInfo.items[index]; curPoint.count = 1, curPoint.clusterType = !1, curPoint.clusterDatas = [], clusterPoints.push(curPoint) } else { var centerX = (pGridInfo.minX + pGridInfo.maxX) / 2, centerY = (pGridInfo.minY + pGridInfo.maxY) / 2, count = pGridInfo.items.length, centerPoint = { lng: centerX, lat: centerY, name: "共" + count + '个文旅资源', count: count, clusterType: !0, clusterDatas: pGridInfo.items }; clusterPoints.push(centerPoint) } } return mapDataGrid = [], clusterPoints } });

return {
  data: [{
    name: "plugins",
    value: {
      "utils": utils,
      "RBushItem": RBushItem,
      "RBU": RBU,
      "RBush": RBush,
      "AreaForRender": AreaForRender,
      "LeftNumFunnel": LeftNumFunnel,
      "quickselect": quickselect,
      "SphericalMercator": SphericalMercator,
      "PointItem": PointItem,
      "PointForRender": PointForRender,
      "BoundsItem": BoundsItem,
      "QuadTree": QuadTree,
      "Node": Node,
      "PointSimplifier": PointSimplifier,
      "BaseRender": BaseRender
    }
  }]
}